


import sys
sys.path.append('..')
import config

import webbrowser
import pyautogui
import time
import tkinter
import os
from PIL import ImageGrab

def move_click(x,y,click_wait=0.1):                  # 移动点击鼠标
    pyautogui.moveTo(x, y)
    time.sleep(0.01)
    pyautogui.click(x, y)    
    time.sleep(click_wait)

def get_clipboard():                                # 复制剪切板的文件
    root = tkinter.Tk()
    root.withdraw()
    return root.clipboard_get()

def screenshot_and_save():
    screenshot = ImageGrab.grab()
    p = os.path.join(config.p_dict['temp'], 'screenshot.png')
    screenshot.save(p)
    return screenshot


def run():
    screenshot_and_save()



if __name__=='__main__':
    run()